#include "faceDetector.h"

#include "cv.h"
#include <highgui.h>
#include <iostream>

using namespace std;



int main( int argc, const char** argv ) {

	FaceDetector* fd = new FaceDetector(1.0);
	
	//TODO : Use resource tracker
	
	Mat image = imread( "../../samples/facetest1.jpg", 1 );
	
	 
	
	cout << "rows " << image.rows << endl; 
	
	cout << "cols " << image.cols << endl; 
	
	vector<Rect>* faces = fd->detectFace(image);
	
	vector<Rect>::const_iterator r = faces->begin();
	
	Scalar color = CV_RGB(0,128,255);
	
	rectangle( image, cvPoint(r->x, r->y), cvPoint(r->x+r->width, r->y + r->height), color, 3);

	cv::imshow( "result", image );
	
	cvWaitKey(0);
	
	cvDestroyWindow("result");
	
	return 0;

}